package net.xdclass.rbac_shiro.dao;

import net.xdclass.rbac_shiro.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * Created whit IntelliJ IDEA
 * User:杨骏杰
 * Date:2021/2/15
 * Time:20:24
 */
@Mapper
public interface UserMapper {

    @Select("select * from user where username = #{username}")
    User findByUserName(@Param("username")String username);

    @Select("select * from user where id=#{id}")
    User findByid(@Param("userId")int id);

    @Select("select * from user where username = #{username} and password = #{pwd}")
    User findByUserNameAndPwd(@Param("username")String username,@Param("pwd")String pwd);
}
